

<?php
session_start();

 if($_SESSION['fl']!=1)
{
	header("Location:home.html");
}



$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $tripcode=$_POST['tripcode'];
  $name=$_POST['tripname'];
  $days=$_POST['days'];
  $cost=$_POST['cost'];
 $dates=$_POST['available'];
    
  $sql="INSERT INTO tours(tripcode,name,days,cost,dates) VALUES('$tripcode','$name','$days','$cost','$dates')"; 
  
 
  
  if(!mysql_query($sql,$con))
  {
  die('error:'.mysql_error());
  }
  
  
  
  mysql_close($con);
  
  ?>
  <script language="javascript"> 
		 alert("Table Updated- New Record added"); window.location.href='admintours.php'; </script> 
